<!--客户店铺配置页面-->
<template>
  <el-card shadow="never" class="aui-card--fill">
    <div class="mod-sys__good">
      <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
        <el-form-item prop="id">
          <el-input v-model="dataForm.id" placeholder="请输入申请ID" clearable></el-input>
        </el-form-item>
        <el-form-item>
          <el-button  v-if="$hasPermission('api:checkUserRecords:page')" @click="getDataList()">查询</el-button>
        </el-form-item>
        <el-form-item>
          <el-button v-if="$hasPermission('api:checkUserRecords:save')" type="primary" @click="addOrUpdateHandle()">
            新增
          </el-button>
        </el-form-item>
        <el-form-item>
          <el-button v-if="$hasPermission('api:checkUserRecords:delete')" type="danger" @click="deleteHandle()">
            删除
          </el-button>
        </el-form-item>
      </el-form>
      <el-table
          v-loading="dataListLoading"
          :data="dataList"
          stripe highlight-current-row
          @selection-change="dataListSelectionChangeHandle"
          @sort-change="dataListSortChangeHandle"
          style="width: 100%;">
        <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
        <el-table-column prop="id" label="ID" header-align="center" align="center"></el-table-column>
        <el-table-column prop="checkStatus" label="审核状态" header-align="center" align="center" width="">
          <template slot-scope="{row,$index}">
            <div v-if="row.checkStatus === 1" size="small" type="success">
              {{ $getDictLabel("checkStatus", row.checkStatus) }}
            </div>
            <div v-else size="small" type="info">{{
                $getDictLabel("checkStatus", row.checkStatus)
              }}
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="name" label="联系姓名" header-align="center" align="center" width="" show-overflow-tooltip></el-table-column>
        <el-table-column prop="phone" label="联系电话" header-align="center" align="center" width="" show-overflow-tooltip></el-table-column>
        <el-table-column prop="province" label="区域" header-align="center" align="center" width=""  show-overflow-tooltip>
          <template slot-scope="{row}">
            {{row.province}}{{row.city}}{{row.area}}
          </template>
        </el-table-column>
        <el-table-column prop="address" label="详细地址" header-align="center" align="center" width="" show-overflow-tooltip></el-table-column>
        <el-table-column prop="createDate" label="创建日期" header-align="center" align="center"></el-table-column>
        <el-table-column label="操作" fixed="right" header-align="center" align="center" width="150">
          <template slot-scope="scope">
            <el-link v-if="$hasPermission('api:checkUserRecords:update')" type="primary"
                       @click="addOrUpdateHandle(scope.row.id)">修改
            </el-link>
            <el-link v-if="$hasPermission('api:checkUserRecords:delete')"
                     type="primary"
                     @click="deleteHandle(scope.row.id)">删除
            </el-link>
          </template>
        </el-table-column>
      </el-table>
      <!-- 弹窗, 新增 / 修改 -->
      <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
    </div>
  </el-card>
</template>

<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './checkUserRecordsAddOrUpdate.vue'

export default {
  mixins: [mixinViewModule],
  data() {
    return {
      mixinViewModuleOptions: {
        getDataListURL: '/api/checkUserRecords/page',
        getDataListIsPage: true,
        deleteURL: '/api/checkUserRecords',
        deleteIsBatch: true
      },
      dataForm: {
        id: '', 							   //id
        checkStatus: '', 				//审核状态
        name:'',                //姓名
        phone: '', 					    //电话
        province: '', 					//省份
        city: '', 						  //市
        area: '', 						  //区
        address: '', 					  //详细地址
      },
    }
  },
  components: {
    AddOrUpdate
  },
  created() {
  },
  mounted() {},
  methods:{
  }
}
</script>
<style lang="scss" scoped>
::v-deep .el-image__inner {
  //height: 50px;
}
img {
  height: 400px;
}
</style>
